<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?a7c05ce530152d9866930ef4850ee566"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    
    
    
    <title>腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7 | 神奇的鸭鸭の码农库 | 新知识要不断的总结记录成笔记，要多写，多画，能够清晰透彻的将知识讲给别人听，才是达到理解的层次。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#765959">
    
    
    <meta name="keywords" content="环境搭建">
    <meta name="description" content="前段时间参加校内网页设计大赛，便入手了一台腾讯云学生乞丐版服务器(1元/月)，但由于不会使用linux，当时便使用了windows server挂上了我的项目，今日闲暇，对在linux下部署JavaWeb环境进行了学习，整理本套笔记，可供初学者参考与将来查阅。 注：本文前半部分对linux的指令进行介绍，但只涉及到linux最最基本的指令，本文只适合希望在服务器部署JavaWeb项目的JavaWe">
<meta name="keywords" content="环境搭建">
<meta property="og:type" content="article">
<meta property="og:title" content="腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7">
<meta property="og:url" content="http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/index.html">
<meta property="og:site_name" content="神奇的鸭鸭の码农库">
<meta property="og:description" content="前段时间参加校内网页设计大赛，便入手了一台腾讯云学生乞丐版服务器(1元/月)，但由于不会使用linux，当时便使用了windows server挂上了我的项目，今日闲暇，对在linux下部署JavaWeb环境进行了学习，整理本套笔记，可供初学者参考与将来查阅。 注：本文前半部分对linux的指令进行介绍，但只涉及到linux最最基本的指令，本文只适合希望在服务器部署JavaWeb项目的JavaWe">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/%25D%253$%7DR%5D0A@ZM%25_%29I9Y976P.png">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/0%29ZU1$MBIU$I%7B_PMFQQY%29WK.png">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/S8X%5BR@ZG%7B6%5D1~U%28U3G_O%7D%286.png">
<meta property="og:updated_time" content="2017-12-05T06:09:58.119Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7">
<meta name="twitter:description" content="前段时间参加校内网页设计大赛，便入手了一台腾讯云学生乞丐版服务器(1元/月)，但由于不会使用linux，当时便使用了windows server挂上了我的项目，今日闲暇，对在linux下部署JavaWeb环境进行了学习，整理本套笔记，可供初学者参考与将来查阅。 注：本文前半部分对linux的指令进行介绍，但只涉及到linux最最基本的指令，本文只适合希望在服务器部署JavaWeb项目的JavaWe">
<meta name="twitter:image" content="http://om6odecqr.bkt.clouddn.com/%25D%253$%7DR%5D0A@ZM%25_%29I9Y976P.png">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.4.3">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">神奇的鸭鸭</h5>
          <a href="mailto:702038338@qq.com" title="702038338@qq.com" class="mail">702038338@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/magic_duck" target="_blank" >
                <i class="icon icon-lg icon-gg-circle"></i>
                码云
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.zhihu.com/people/shen-qi-de-ya-ya" target="_blank" >
                <i class="icon icon-lg icon-twitter"></i>
                知乎
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/404.html"  >
                <i class="icon icon-lg icon-link"></i>
                404页面测试
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7</h1>
        <h5 class="subtitle">
            
                <time datetime="2017-06-08T16:00:00.000Z" itemprop="datePublished" class="page-time">
  2017-06-09
</time>


            
        </h5>
    </div>

    

</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#linux目录结构"><span class="post-toc-number">1.</span> <span class="post-toc-text">linux目录结构</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#linux切换目录"><span class="post-toc-number">2.</span> <span class="post-toc-text">linux切换目录</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#目录的相关命令"><span class="post-toc-number">3.</span> <span class="post-toc-text">目录的相关命令</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#1-增加目录"><span class="post-toc-number">3.1.</span> <span class="post-toc-text">1 增加目录</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#查看目录"><span class="post-toc-number">3.2.</span> <span class="post-toc-text">查看目录</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#寻找目录"><span class="post-toc-number">3.3.</span> <span class="post-toc-text">寻找目录</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#修改目录的名称"><span class="post-toc-number">3.4.</span> <span class="post-toc-text">修改目录的名称</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#移动目录的位置-–-剪切"><span class="post-toc-number">3.5.</span> <span class="post-toc-text">移动目录的位置 – 剪切</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#拷贝目录"><span class="post-toc-number">3.6.</span> <span class="post-toc-text">拷贝目录</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#删除目录"><span class="post-toc-number">3.7.</span> <span class="post-toc-text">删除目录</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#文件的相关命令"><span class="post-toc-number">4.</span> <span class="post-toc-text">文件的相关命令</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#文件的创建"><span class="post-toc-number">4.1.</span> <span class="post-toc-text">文件的创建</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#文件的查看"><span class="post-toc-number">4.2.</span> <span class="post-toc-text">文件的查看</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#修改文件的内容"><span class="post-toc-number">4.3.</span> <span class="post-toc-text">修改文件的内容</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#删除文件"><span class="post-toc-number">4.4.</span> <span class="post-toc-text">删除文件</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#压缩和解压命令"><span class="post-toc-number">5.</span> <span class="post-toc-text">压缩和解压命令</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#打包并压缩"><span class="post-toc-number">5.1.</span> <span class="post-toc-text">打包并压缩</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#解压压缩包"><span class="post-toc-number">5.2.</span> <span class="post-toc-text">解压压缩包</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#linux其他命令"><span class="post-toc-number">6.</span> <span class="post-toc-text">linux其他命令</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#显示当前所在位置"><span class="post-toc-number">6.1.</span> <span class="post-toc-text">显示当前所在位置</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#搜索命令"><span class="post-toc-number">6.2.</span> <span class="post-toc-text">搜索命令</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#管道命令"><span class="post-toc-number">6.3.</span> <span class="post-toc-text">管道命令</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#查看进程"><span class="post-toc-number">6.4.</span> <span class="post-toc-text">查看进程</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#杀死进程"><span class="post-toc-number">6.5.</span> <span class="post-toc-text">杀死进程</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#网络通信命令"><span class="post-toc-number">6.6.</span> <span class="post-toc-text">网络通信命令</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#linux权限命令"><span class="post-toc-number">7.</span> <span class="post-toc-text">linux权限命令</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#远程连接工具的使用"><span class="post-toc-number">8.</span> <span class="post-toc-text">远程连接工具的使用</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#jdk的安装"><span class="post-toc-number">9.</span> <span class="post-toc-text">jdk的安装</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#先查看当前linux系统是否安装java"><span class="post-toc-number">9.1.</span> <span class="post-toc-text">先查看当前linux系统是否安装java</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#如果有，将其卸载"><span class="post-toc-number">9.2.</span> <span class="post-toc-text">如果有，将其卸载</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#上传jdk到linux上"><span class="post-toc-number">9.3.</span> <span class="post-toc-text">上传jdk到linux上</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#解压jdk到-usr-local下"><span class="post-toc-number">9.4.</span> <span class="post-toc-text">解压jdk到/usr/local下</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#配置jdk环境变量，打开-etc-profile配置文件，将下面配置拷贝进去"><span class="post-toc-number">9.5.</span> <span class="post-toc-text">配置jdk环境变量，打开/etc/profile配置文件，将下面配置拷贝进去</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#重新加载-etc-profile配置文件"><span class="post-toc-number">9.6.</span> <span class="post-toc-text">重新加载/etc/profile配置文件</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#mysql的安装"><span class="post-toc-number">10.</span> <span class="post-toc-text">mysql的安装</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#查看CentOS自带的mysql"><span class="post-toc-number">10.1.</span> <span class="post-toc-text">查看CentOS自带的mysql</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#如果有，将自带的卸载"><span class="post-toc-number">10.2.</span> <span class="post-toc-text">如果有，将自带的卸载</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#上传mysql到linux"><span class="post-toc-number">10.3.</span> <span class="post-toc-text">上传mysql到linux</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#解压mysql到-usr-local-下的mysql目录-自己创建"><span class="post-toc-number">10.4.</span> <span class="post-toc-text">解压mysql到/usr/local/下的mysql目录(自己创建)</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#在-usr-local-mysql下安装mysql"><span class="post-toc-number">10.5.</span> <span class="post-toc-text">在/usr/local/mysql下安装mysql</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#启动mysql"><span class="post-toc-number">10.6.</span> <span class="post-toc-text">启动mysql</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#将mysql加到系统服务中并设置开机启动"><span class="post-toc-number">10.7.</span> <span class="post-toc-text">将mysql加到系统服务中并设置开机启动</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#登录mysql"><span class="post-toc-number">10.8.</span> <span class="post-toc-text">登录mysql</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#修改mysql的密码"><span class="post-toc-number">10.9.</span> <span class="post-toc-text">修改mysql的密码</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#开启mysql的远程登录"><span class="post-toc-number">10.10.</span> <span class="post-toc-text">开启mysql的远程登录</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#开发linux的对外访问的端口3306"><span class="post-toc-number">10.11.</span> <span class="post-toc-text">开发linux的对外访问的端口3306</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#tomcat的安装"><span class="post-toc-number">11.</span> <span class="post-toc-text">tomcat的安装</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#上传Tomcat到linux上"><span class="post-toc-number">11.1.</span> <span class="post-toc-text">上传Tomcat到linux上</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#解压Tomcat到-usr-local下"><span class="post-toc-number">11.2.</span> <span class="post-toc-text">解压Tomcat到/usr/local下</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#开放linux的对外访问端口8080"><span class="post-toc-number">11.3.</span> <span class="post-toc-text">开放linux的对外访问端口8080</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#启动关闭Tomcat"><span class="post-toc-number">11.4.</span> <span class="post-toc-text">启动关闭Tomcat</span></a></li></ol></li></ol>
        </nav>
    </aside>
    
<article id="post-cloud.tencent_Centos6.5_Install_JavaEnvironment"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7</h1>
        <div class="post-meta">
            <time class="post-time" title="2017年06月09日 0:00" datetime="2017-06-08T16:00:00.000Z"  itemprop="datePublished">2017-06-09</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <p>前段时间参加校内网页设计大赛，便入手了一台腾讯云学生乞丐版服务器(1元/月)，但由于不会使用linux，当时便使用了windows server挂上了我的项目，今日闲暇，对在linux下部署JavaWeb环境进行了学习，整理本套笔记，可供初学者参考与将来查阅。</p>
<p>注：本文前半部分对linux的指令进行介绍，但只涉及到linux最最基本的指令，本文只适合希望在服务器部署JavaWeb项目的JavaWeb初学者翻看。</p>
<h2 id="linux目录结构"><a href="#linux目录结构" class="headerlink" title="linux目录结构"></a>linux目录结构</h2><table>
<thead>
<tr>
<th style="text-align:center">目录结构</th>
<th style="text-align:center">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">bin</td>
<td style="text-align:center">存放二进制可执行文件</td>
</tr>
<tr>
<td style="text-align:center">sbin</td>
<td style="text-align:center">存放二进制可执行文件，只有root才能访问</td>
</tr>
<tr>
<td style="text-align:center"><strong>etc</strong></td>
<td style="text-align:center">存放系统配置文件(profile文件是配环境变量的)</td>
</tr>
<tr>
<td style="text-align:center"><strong>usr</strong></td>
<td style="text-align:center">存放共享的系统资源</td>
</tr>
<tr>
<td style="text-align:center">home</td>
<td style="text-align:center">存放用户文件的根目录</td>
</tr>
<tr>
<td style="text-align:center">root</td>
<td style="text-align:center">超级用户目录</td>
</tr>
<tr>
<td style="text-align:center">dev</td>
<td style="text-align:center">存放设备文件</td>
</tr>
<tr>
<td style="text-align:center">lib</td>
<td style="text-align:center">存放跟文件系统中的程序运行所需要的共享库及内核模块</td>
</tr>
<tr>
<td style="text-align:center">mnt</td>
<td style="text-align:center">系统管理员安装临时文件系统的安装点</td>
</tr>
<tr>
<td style="text-align:center">boot</td>
<td style="text-align:center">存放用于系统引导时使用的各种文件</td>
</tr>
<tr>
<td style="text-align:center">tmp</td>
<td style="text-align:center">用于存放各种临时文件</td>
</tr>
<tr>
<td style="text-align:center">var</td>
<td style="text-align:center">用于存放运行时需要改变的数据的文件</td>
</tr>
</tbody>
</table>
<h2 id="linux切换目录"><a href="#linux切换目录" class="headerlink" title="linux切换目录"></a>linux切换目录</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">ls      // 查看目录的所有目录和文件</div><div class="line">cd usr  // 切换到该目录下usr目录</div><div class="line">cd ../  // 切换到上一层目录</div><div class="line">cd /    // 切换到系统根目录</div><div class="line">cd ~    // 切换到用户主目录</div><div class="line">cd -    // 切换到上一个所在目录</div></pre></td></tr></table></figure>
<h2 id="目录的相关命令"><a href="#目录的相关命令" class="headerlink" title="目录的相关命令"></a>目录的相关命令</h2><h3 id="1-增加目录"><a href="#1-增加目录" class="headerlink" title="1 增加目录"></a>1 增加目录</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：mkdir 目录名称</div></pre></td></tr></table></figure>
<h3 id="查看目录"><a href="#查看目录" class="headerlink" title="查看目录"></a>查看目录</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">命令：ls      // 查看当前目录的所有的目录和文件</div><div class="line">命令：ls -a   // 可以看到当前目录下的所有文件和目录(包括隐藏的)</div><div class="line">命令：ls -l   // 可以看到所有文件和目录的详细信息(可以缩写成ll)</div></pre></td></tr></table></figure>
<h3 id="寻找目录"><a href="#寻找目录" class="headerlink" title="寻找目录"></a>寻找目录</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">命令：find 目录 参数</div><div class="line">示例：查找根/下的与test相关的目录(文件)  find / -name '*test*'</div></pre></td></tr></table></figure>
<h3 id="修改目录的名称"><a href="#修改目录的名称" class="headerlink" title="修改目录的名称"></a>修改目录的名称</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：mv 目录名称 新目录名称</div></pre></td></tr></table></figure>
<h3 id="移动目录的位置-–-剪切"><a href="#移动目录的位置-–-剪切" class="headerlink" title="移动目录的位置 – 剪切"></a>移动目录的位置 – 剪切</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">命令：mv 目录名称 目录的新位置</div><div class="line">示例：在test下将newTest目录剪切到 /usr下面，使用mv newTest /usr</div></pre></td></tr></table></figure>
<h3 id="拷贝目录"><a href="#拷贝目录" class="headerlink" title="拷贝目录"></a>拷贝目录</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">命令：cp -r 目录名称 目录拷贝的目标位置 -----r代表递归拷贝</div><div class="line">示例：将/usr下的newTest拷贝到根目录下的test中，</div><div class="line">使用cp -r /usr/newTest /test</div></pre></td></tr></table></figure>
<h3 id="删除目录"><a href="#删除目录" class="headerlink" title="删除目录"></a>删除目录</h3><p>注意：rm不仅可以删除目录，也可以删除其他文件或压缩包，为了增强大家的记忆，    无论删除任何目录或文件，都直接使用rm -rf 目录/文件/压缩包</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">命令：rm -r 目录    //删除目录，有询问</div><div class="line">命令：rm -rf 目录   //删除目录，不需要询问强制删除</div></pre></td></tr></table></figure>
<h2 id="文件的相关命令"><a href="#文件的相关命令" class="headerlink" title="文件的相关命令"></a>文件的相关命令</h2><h3 id="文件的创建"><a href="#文件的创建" class="headerlink" title="文件的创建"></a>文件的创建</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：touch 文件名称    //空文件</div></pre></td></tr></table></figure>
<h3 id="文件的查看"><a href="#文件的查看" class="headerlink" title="文件的查看"></a>文件的查看</h3><p>注意：tail -f 文件，可以对某个文件进行动态监控，例如tomcat的日志文件，会随着程序的运行，日志会变化，可以使用tail-fcatalina-2016-11-11.log 监控文件的变化<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">命令：cat/more/less/tail 文件</div><div class="line">示例：</div><div class="line">使用cat查看etc/sudo.conf只能显示最后一屏</div><div class="line">使用more查看etc/sudo.conf可以显示百分比，回车下一行，空格下一页，q退出查看</div><div class="line">使用less查看etc/sudo.conf，可以使用上下翻页，q退出查看</div><div class="line">使用tail -10 查看etc/sudo.conf文件的后10行，ctrl+c结束</div></pre></td></tr></table></figure></p>
<h3 id="修改文件的内容"><a href="#修改文件的内容" class="headerlink" title="修改文件的内容"></a>修改文件的内容</h3><p>在实际开发中，使用vim编辑器主要作用就是修改配置文件P:</p>
<ol>
<li>vim 文件</li>
<li>进入文件</li>
<li>命令模式</li>
<li>按i进入编辑模式</li>
<li>编辑文件</li>
<li>按esc进入底行模式</li>
<li>输入:wq或:q!</li>
</ol>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">命令：vim 文件</div><div class="line">示例：编辑/test下的aaa.txt文件，使用vim aaa.txt</div><div class="line">- 但此时并不能编辑，因为处于命令模式，点击键盘i/a/o进入编辑模式，可以编辑文件，编辑完成后，按esc退回命令模式。</div><div class="line">- 此时文件已经编辑完毕，但没进行保存，需要输入冒号: 进入底行模式，输入wq代表写入内容并退出，即保存，输入q!代表强制推出不保存。</div></pre></td></tr></table></figure>
<h3 id="删除文件"><a href="#删除文件" class="headerlink" title="删除文件"></a>删除文件</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">同目录删除：熟记 rm -rf 文件 即可</div></pre></td></tr></table></figure>
<h2 id="压缩和解压命令"><a href="#压缩和解压命令" class="headerlink" title="压缩和解压命令"></a>压缩和解压命令</h2><p>Linux中的打包文件一般是以.tar结尾的，压缩的命令一般是以.gz结尾的。<br>而一般情况下打包和压缩是一起进行的，打包并压缩后的文件的后缀名一般.tar.gz。</p>
<h3 id="打包并压缩"><a href="#打包并压缩" class="headerlink" title="打包并压缩"></a>打包并压缩</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line">命令：tar -zcvf 打包压缩文件后的文件名 要打包压缩的文件</div><div class="line">其中：</div><div class="line">    z：调用gzip压缩命令进行压缩</div><div class="line">    c：打包文件</div><div class="line">    v：显示运行过程</div><div class="line">    f：指定文件名</div><div class="line">示例：打包并压缩/test下的所有文件，压缩后的压缩包指定名称为xxx.tar.gz：</div><div class="line">tar -zcvf xxx.tar.gz aaa.txt bbb.txt ccc.txt</div><div class="line">tar -zcvf xxx.tar.gz /test/*</div></pre></td></tr></table></figure>
<h3 id="解压压缩包"><a href="#解压压缩包" class="headerlink" title="解压压缩包"></a>解压压缩包</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">命令：tar -xvf 压缩文件</div><div class="line">其中：</div><div class="line">    x：代表解压</div><div class="line">示例：将/test下的xxx.tar.gz解压到当前目录下：</div><div class="line">tar -xvf xxx.tar.gz</div><div class="line">示例：将/test下的xxx.tar.gz解压到根目录/usr下：</div><div class="line">tar -xvf xxx.tar.gz -C/usr  //C代表指定解压的位置</div></pre></td></tr></table></figure>
<h2 id="linux其他命令"><a href="#linux其他命令" class="headerlink" title="linux其他命令"></a>linux其他命令</h2><h3 id="显示当前所在位置"><a href="#显示当前所在位置" class="headerlink" title="显示当前所在位置"></a>显示当前所在位置</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：pwd</div></pre></td></tr></table></figure>
<h3 id="搜索命令"><a href="#搜索命令" class="headerlink" title="搜索命令"></a>搜索命令</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">命令：grep 要搜索的字符串 要搜索的文件</div><div class="line">示例：搜索/usr/sudu.conf文件中包含字符串to的行：</div><div class="line">grep to sudo.conf</div><div class="line">示例：搜索/usr/sudu.conf文件中包含字符串to的行 to要高亮显示：</div><div class="line">grep to sudo,conf --color</div></pre></td></tr></table></figure>
<h3 id="管道命令"><a href="#管道命令" class="headerlink" title="管道命令"></a>管道命令</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">命令：|将前一个命令的输出作为本次目录的输入</div><div class="line">实例：查看当前系统中所有的进程中包括system字符串的进程</div><div class="line">ps -ef | grep system</div></pre></td></tr></table></figure>
<h3 id="查看进程"><a href="#查看进程" class="headerlink" title="查看进程"></a>查看进程</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：ps -ef</div></pre></td></tr></table></figure>
<h3 id="杀死进程"><a href="#杀死进程" class="headerlink" title="杀死进程"></a>杀死进程</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：kill -9 进程的pid</div></pre></td></tr></table></figure>
<h3 id="网络通信命令"><a href="#网络通信命令" class="headerlink" title="网络通信命令"></a>网络通信命令</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">查看当前系统的网卡信息：ifconfig</div><div class="line">查看与某台机器的连接情况：ping</div><div class="line">查看当前系统的端口使用：netstat -an</div></pre></td></tr></table></figure>
<h2 id="linux权限命令"><a href="#linux权限命令" class="headerlink" title="linux权限命令"></a>linux权限命令</h2><p>权限是Linux中的重要概念，每个文件/目录等都具有权限，通过ls -l命令我们可以    查看某个目录下的文件或目录的权限<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">示例：在随意某个目录下ls -l</div></pre></td></tr></table></figure></p>
<p><img src="http://om6odecqr.bkt.clouddn.com/%25D%253$%7DR%5D0A@ZM%25_%29I9Y976P.png" alt="此处输入图片的描述"></p>
<p>第一列的内容信息解释如下</p>
<p><img src="http://om6odecqr.bkt.clouddn.com/0%29ZU1$MBIU$I%7B_PMFQQY%29WK.png" alt="此处输入图片的描述"></p>
<h2 id="远程连接工具的使用"><a href="#远程连接工具的使用" class="headerlink" title="远程连接工具的使用"></a>远程连接工具的使用</h2><p>实际开发中，Linux服务器都在其他的地方，我们要通过远程的方式去连接Linux并操作它，这里我选择使用Xshell 5。<br><img src="http://om6odecqr.bkt.clouddn.com/S8X%5BR@ZG%7B6%5D1~U%28U3G_O%7D%286.png" alt="此处输入图片的描述"><br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">使用Xshell，我们可以将要上传的文件直接拖拽到linux上，但是必须先安装lrzsz这个软件包：</div><div class="line">命令：yum -y install lrzsz</div></pre></td></tr></table></figure></p>
<h2 id="jdk的安装"><a href="#jdk的安装" class="headerlink" title="jdk的安装"></a>jdk的安装</h2><p>步骤如下：</p>
<h3 id="先查看当前linux系统是否安装java"><a href="#先查看当前linux系统是否安装java" class="headerlink" title="先查看当前linux系统是否安装java"></a>先查看当前linux系统是否安装java</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：rpm -qa | grep java0</div></pre></td></tr></table></figure>
<h3 id="如果有，将其卸载"><a href="#如果有，将其卸载" class="headerlink" title="如果有，将其卸载"></a>如果有，将其卸载</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">rpm -e --nodeps 要卸载的软件</div></pre></td></tr></table></figure>
<h3 id="上传jdk到linux上"><a href="#上传jdk到linux上" class="headerlink" title="上传jdk到linux上"></a>上传jdk到linux上</h3><h3 id="解压jdk到-usr-local下"><a href="#解压jdk到-usr-local下" class="headerlink" title="解压jdk到/usr/local下"></a>解压jdk到/usr/local下</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">tar -xvf 5）–xvf jdk-7u71-linux-i586.tar.gz –C /usr/local</div></pre></td></tr></table></figure>
<h3 id="配置jdk环境变量，打开-etc-profile配置文件，将下面配置拷贝进去"><a href="#配置jdk环境变量，打开-etc-profile配置文件，将下面配置拷贝进去" class="headerlink" title="配置jdk环境变量，打开/etc/profile配置文件，将下面配置拷贝进去"></a>配置jdk环境变量，打开/etc/profile配置文件，将下面配置拷贝进去</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span>set java environment</div><div class="line">JAVA_HOME=/usr/local/jdk1.7.0_71</div><div class="line">CLASSPATH=.:$JAVA_HOME/lib.tools.jar</div><div class="line">PATH=$JAVA_HOME/bin:$PATH</div><div class="line">export JAVA_HOME CLASSPATH PATH</div></pre></td></tr></table></figure>
<h3 id="重新加载-etc-profile配置文件"><a href="#重新加载-etc-profile配置文件" class="headerlink" title="重新加载/etc/profile配置文件"></a>重新加载/etc/profile配置文件</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">source /etc/profile</div></pre></td></tr></table></figure>
<h2 id="mysql的安装"><a href="#mysql的安装" class="headerlink" title="mysql的安装"></a>mysql的安装</h2><h3 id="查看CentOS自带的mysql"><a href="#查看CentOS自带的mysql" class="headerlink" title="查看CentOS自带的mysql"></a>查看CentOS自带的mysql</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">命令：rpm -qa | grep mysql</div></pre></td></tr></table></figure>
<h3 id="如果有，将自带的卸载"><a href="#如果有，将自带的卸载" class="headerlink" title="如果有，将自带的卸载"></a>如果有，将自带的卸载</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">rpm -e --nodeps mysql-libs-5.1.73-5.e16_6.i686</div></pre></td></tr></table></figure>
<h3 id="上传mysql到linux"><a href="#上传mysql到linux" class="headerlink" title="上传mysql到linux"></a>上传mysql到linux</h3><h3 id="解压mysql到-usr-local-下的mysql目录-自己创建"><a href="#解压mysql到-usr-local-下的mysql目录-自己创建" class="headerlink" title="解压mysql到/usr/local/下的mysql目录(自己创建)"></a>解压mysql到/usr/local/下的mysql目录(自己创建)</h3><h3 id="在-usr-local-mysql下安装mysql"><a href="#在-usr-local-mysql下安装mysql" class="headerlink" title="在/usr/local/mysql下安装mysql"></a>在/usr/local/mysql下安装mysql</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">不用全部安装，安装以下即可：</div><div class="line">安装服务器端：rpm -ivh MySQL-server-5.6.22-1.el6.i686.rpm</div><div class="line">安装客户端：rpm -ivh MySQL-client-5.6.22-1.el6.i686.rpm</div></pre></td></tr></table></figure>
<h3 id="启动mysql"><a href="#启动mysql" class="headerlink" title="启动mysql"></a>启动mysql</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">service mysql start</div></pre></td></tr></table></figure>
<h3 id="将mysql加到系统服务中并设置开机启动"><a href="#将mysql加到系统服务中并设置开机启动" class="headerlink" title="将mysql加到系统服务中并设置开机启动"></a>将mysql加到系统服务中并设置开机启动</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">加入到系统服务：chkconfig --add mysql</div><div class="line">自动启动：chkconfig mysql on</div></pre></td></tr></table></figure>
<h3 id="登录mysql"><a href="#登录mysql" class="headerlink" title="登录mysql"></a>登录mysql</h3><p>mysql安装好后会生成一个临时随机密码，存储位置在/root/.mysql_secret<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">mysql -u root -p</div></pre></td></tr></table></figure></p>
<h3 id="修改mysql的密码"><a href="#修改mysql的密码" class="headerlink" title="修改mysql的密码"></a>修改mysql的密码</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">set password=password('root');</div></pre></td></tr></table></figure>
<h3 id="开启mysql的远程登录"><a href="#开启mysql的远程登录" class="headerlink" title="开启mysql的远程登录"></a>开启mysql的远程登录</h3><p>默认情况下mysql为安全起见，不支持远程登录mysql，所以需要设置开启    远程登录mysql的权限<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">登录mysql后输入如下命令：</div><div class="line">grant all privileges on *.* to 'root' @'%' identified by 'root';</div><div class="line">flush privileges;</div></pre></td></tr></table></figure></p>
<h3 id="开发linux的对外访问的端口3306"><a href="#开发linux的对外访问的端口3306" class="headerlink" title="开发linux的对外访问的端口3306"></a>开发linux的对外访问的端口3306</h3><p>如果你和我一样使用腾讯云，那么还需要去设置安全组。<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT</div><div class="line">/etc/rc.d/init.d/iptables save ---将修改永久保存到防火墙中</div></pre></td></tr></table></figure></p>
<h2 id="tomcat的安装"><a href="#tomcat的安装" class="headerlink" title="tomcat的安装"></a>tomcat的安装</h2><h3 id="上传Tomcat到linux上"><a href="#上传Tomcat到linux上" class="headerlink" title="上传Tomcat到linux上"></a>上传Tomcat到linux上</h3><h3 id="解压Tomcat到-usr-local下"><a href="#解压Tomcat到-usr-local下" class="headerlink" title="解压Tomcat到/usr/local下"></a>解压Tomcat到/usr/local下</h3><h3 id="开放linux的对外访问端口8080"><a href="#开放linux的对外访问端口8080" class="headerlink" title="开放linux的对外访问端口8080"></a>开放linux的对外访问端口8080</h3><p>如果你和我一样使用腾讯云，那么还需要去设置安全组。<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT</div><div class="line">/etc/rc.d/init.d/iptables save</div></pre></td></tr></table></figure></p>
<h3 id="启动关闭Tomcat"><a href="#启动关闭Tomcat" class="headerlink" title="启动关闭Tomcat"></a>启动关闭Tomcat</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">进入tomcat的bin下启动：./startup.sh</div><div class="line">进入tomcat的bin下关闭：./shutdown.sh</div></pre></td></tr></table></figure>
<p>至此，JavaWeb环境搭建完毕。</p>
<hr>
<p>补充，然而并没有什么鬼用，在腾讯云主机重装系统里，选择服务市场的基础环境，里面已经有搭建好多版本环境的镜像可用，如：<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">Java多版本环境（Nginx Tomcat JDK MySql）(8GB)</div><div class="line">操作系统：CentOS 6.5 64位</div><div class="line">集成软件：Nginx 1.8.0+Tomcat 6/Tomcat 7/Tomcat 8+JDK 1.6/1.7/1.8+MySQL5.6+VSFTPD 2.2</div><div class="line">提供商家：杭州康展通信科技有限公司</div></pre></td></tr></table></figure></p>
<p>汗(lll￢ω￢)，，，那我折腾这一天干嘛QAQ</p>

        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2017-12-05T06:09:58.119Z" itemprop="dateUpdated">2017年12月5日 14:09</time>
</span><br>


        如要转载请注明出处：<a href="/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/" target="_blank" rel="external">http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/</a>
    </div>
    <footer>
        <a href="http://magic_duck.oschina.io">
            <img src="/img/avatar.jpg" alt="神奇的鸭鸭">
            神奇的鸭鸭
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/环境搭建/">环境搭建</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/&title=《腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/&title=《腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2017/07/30/jQuery_primary_01/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">jQuery入门(一)</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/06/06/Struts2执行过程的粗略理解/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">Struts2基本执行过程的理解</h4>
      </a>
    </div>
  
</nav>



    







</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        我只要一角钱~ ~
        <i class="icon icon-quote-right"></i>
    </h3>
    <ul class="reward-items">
        
        <li>
            <img src="/img/wechat.png" title="微信打赏二维码" alt="微信打赏二维码">
            <p>微信</p>
        </li>
        

        
        <li>
            <img src="/img/alipay.jpg" title="支付宝打赏二维码" alt="支付宝打赏二维码">
            <p>支付宝</p>
        </li>
        
    </ul>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://git.oschina.net/z77z" target="_blank">邹海清</a></span>
            <span>神奇的鸭鸭の码农库 &copy; 2017</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/&title=《腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/&title=《腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《腾讯云Centos6.5搭建JavaWeb环境:Mysql5.6+jdk1.7+tomcat7》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://magic_duck.oschina.io/2017/06/09/cloud.tencent_Centos6.5_Install_JavaEnvironment/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };



lazyScripts.push('//s95.cnzz.com/z_stat.php?id=1261081671&web_id=1261081671')

</script>

<script src="/js/main.min.js?v=1.4.3"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.4.3" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>


</body>
</html>
